<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<script type="text/html" id="toolbar"></script>
{include file="system@block/layui" /}
<script type="text/javascript">
    layui.use(['table','jquery','form', 'formSelects'], function() {
        var table = layui.table,$=layui.jquery,form = layui.form;var formSelects = layui.formSelects;
        table.render({
            elem: '#dataTable'
            ,url: '{:url()}'+'?type={$param.type}&num={$param.num}&day={$param.day}'  //数据接口
            ,page: true //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,limits: [20,50,100,150,200,10000]
            ,text: {
                none : '暂无相关数据'
            }
            ,toolbar: '#toolbar'
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,cols: [[ //表头
                // {type:'checkbox', fixed:'left'}
                // ,{field: 'id', title: '编号', sort: true}
                {field: 'client_ordernum', title: '订单号'}
                ,{field: 'start_date', title: '开始时间'}
                ,{field: 'end_date', title: '结束时间'}
            ]]
            ,done(res){
                var data=res.data;
                for (var i in data){
                    $('#factory-ids-'+data[i]['id']).val(data[i]['factory_id']);
                }
                layui.form.render();
            }
        });

    });
</script>